package com.githan.ksback_v2_3.Config;

import org.springframework.context.annotation.Configuration;

/**
 * @author https://github.com/Han56
 * @date 2021/3/27 10:22
 * 描述：使用fastjson的配置类
 */
@Configuration
public class MyFastJsonConfig {

//    @Bean
//    FastJsonHttpMessageConverter fastJsonHttpMessageConverter(){
//        FastJsonHttpMessageConverter converter=new FastJsonHttpMessageConverter();
//        FastJsonConfig config = new FastJsonConfig();
//
//        config.setDateFormat("yyyy-MM-dd");
//        config.setCharset(Charset.forName("UTF-8"));
//        config.setSerializerFeatures(
//                SerializerFeature.WriteClassName,
//                SerializerFeature.WriteMapNullValue,
//                SerializerFeature.PrettyFormat,
//                SerializerFeature.WriteNullListAsEmpty,
//                SerializerFeature.WriteNullStringAsEmpty
//        );
//        converter.setFastJsonConfig(config);
//        return converter;
//    }

}
